<?php
/**
* 配置
*
* @author        chenfenghua <843958575@qq.com>
* @copyright     Copyright (c) 2011-2015 shop. All rights reserved.
* @link          http://www.yiitian.com
* @package       yiishop.model
* @license       http://www.yiitian.com/license
* @version       v1.0.0
*/
class ModelConfig extends B2CModel
{
    /**
     * 获取单条数据
     *
     * @param $key
     * @return mixed
     */
    public function item($key)
    {
        $row = $this->ModelQueryRow("SELECT `value` FROM {{ectools_setting}} WHERE `key` = '{$key}'");
        $data = array();
        if ($row) $data = unserialize($row['value']);
        return $data;
    }
} 